import requests, pprint

url = 'http://localhost/api/mgr/orders'

body = {
    "action":"add_order",
    "data":{
        "name":"华山医院订单007",
        "customerid":3,
        "medicinelist":[
            {"id":1,"amount":5,"name":"999感冒灵"},
            {"id":2,"amount":5,"name":"青霉素"}
        ]
    }
}
headers = {
    'Cookie': '__guid=111872281.2068392228007915500.1613907520194.7874; csrftoken=jS95HMyo93dJaqJzXXBWTC1CkNJ1e4x02aTLSExQNQ01SdeMH3rjjVle1b7wYejY; sessionid=vv0b0cjacmgzjbbh17o3gq6z0pif4wku; monitor_count=59'
}

res = requests.post(url, json=body, headers=headers)
pprint.pprint(res.json(), sort_dicts=0)